package com.monitor.display_platform.business.thread;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Observable;
import java.util.Observer;

public class FirstConsumer  implements Runnable {

    private static final Logger log = LoggerFactory.getLogger(FirstConsumer.class);
    private int i = 2;

    @Override
    public void run() {
        log.info("start first consumer");
        while(true){
            try {
                if (i == 10){
                    throw new IllegalArgumentException("参数异常。。。。。。。。。。。。。。。。。。");
                }
                Thread.sleep(1000);
                i ++;
            } catch (InterruptedException e) {

            } catch (IllegalArgumentException e){
            }
        }
    }
}
